<!--每一个页面公共的水平导航栏部分--->
<ul th:fragment="common_nav" class="layui-nav fly-nav-user" lay-filter="demo">

    <img style="padding-left: 240px;" th:src="@{/res/images/logo.png}">
    <span class="layui-nav-title">
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            </span>
    <li class="layui-nav-item"><a th:href="@{/toIndex}"><i class="fa fa-home" aria-hidden="true"></i>首页</a></li>
    <li class="layui-nav-item"><a href=""><i class="fa fa-info-circle" aria-hidden="true"></i>公司简介</a></li>
    <li class="layui-nav-item">
        <a href="javascript:;"><i class="fa fa-car" aria-hidden="true"></i>车型查询</a>
        <dl class="layui-nav-child">
            <!-- 二级菜单 -->
            <dd><a th:href="@{/users/toSearch}">按类型查询</a></dd>
            <dd><a href="#">按品牌查询</a></dd>
            <dd><a href="#">按排量查询</a></dd>
        </dl>
    </li>
    <li class="layui-nav-item"><a href=""><i class="fa fa-question" aria-hidden="true"></i>租车事项</a></li>


    <li th:if="${session.loginUser==null}" class="layui-nav-item"><a th:href="@{/users/toLogin}"><i class="fa fa-user-o" aria-hidden="true"></i>登录</a>
    </li>

    <li th:if="${session.loginUser!=null}" class="layui-nav-item" lay-unselect="">
        <a href="javascript:;"><img th:src="@{/res/avatars/avatar5.png}" class="layui-nav-img"><span th:text="${session.loginUser.username}"></span></a>
        <dl class="layui-nav-child">
            <dd><a href="javascript:;">我的订单</a></dd>
            <dd><a th:href="@{/users/logout}">注销</a></dd>
        </dl>
    </li>

</ul>